<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false" %>
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path ;
  String filePath = request.getServletContext().getRealPath("/applicant/images/");
%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>${company.company_name} - 锐聘网</title>
<link href="<%=basePath%>/css/base.css" type="text/css" rel="stylesheet" />
<link href="<%=basePath%>/css/company.css" type="text/css" rel="stylesheet" />
</head>

<body>
<iframe src="<%=basePath%>/top.jsp" width="100%" height="120" scrolling="no" frameborder="0" ></iframe>
<div class="tn-grid">
  <div class="it-com-keyimg">
    <div class="tn-widget-content"> <img src="<%=basePath%>/images/${company.company_pic}" /> </div>
  </div>
</div>
<div class="clear"></div>
<div class="tn-grid">
  <div class="tn-widget-content">
    <div class="tn-box-content">
      <div class="tn-helper-clearfix">
        <div class="it-main2">
          <div class="it-ctn-heading">
            <div class="it-title-line"> <span> <em> ${company.company_viewnum} </em> 浏览 </span>
              <h3> 企业简介 </h3>
            </div>
          </div>
          <div class="it-com-textnote"> <span class="kuai"> 行业：计算机软件 </span> <span class="kuai"> 所在地：${company.company_area} </span> <span class="kuai"> 规模：${company.company_size} </span> <span class="kuai"> 性质：${company.company_type} </span> </div>
          <div class="it-company-text">
            <h2>${company.company_name}</h2>
            <h4>${company.company_brief}</h4>
          </div>
          <p class="tn-helper-right"> <a href="/Home/SuccessCases?companyId=288" target="_blank" class="tn-action"> <span class="tn-icon"> </span> <span class="tn-action-text"> 成功案例 </span> </a> </p>
        </div>
      </div>
    </div>
  </div>

  <input type="hidden" id="videoListCompanyId" value="151" />
  <input type="hidden" id="companyTotalVideoCount" value='1' />
  <div class="it-content-seqbox">
    <div id="morejob"   >
      <div class="it-ctn-heading">
        <div class="it-title-line">
          <h3> 职位 </h3>
        </div>
      </div><!--职位列表-->
      <div class="it-post-box tn-border-dashed">
        <div class="it-post-name">
          <div class="tn-helper-right it-post-btn">
            <a class="it-font-underline" href="../recruit/job.jsp" target=_blank>
              <span class="tn-icon-view"></span>
              <span class=tn-action-text>查看详细</span>
            </a>
            <a id ="apply" class="tn-button-small" href="#"><span class="tn-button-text">申请</span> </a>
          </div>
          <h3>
            <a title=${job.job_name} href="../recruit/job.jsp" target=_blank>${job.job_name}</a>
          </h3>
        </div>
        <ul class="it-post">
          <li style="width:300px;">薪资： <span 
class="it-font-size">${job.job_salary}</span></li>
          <li style="width:250px;"><span class=tn-text-note>工作地区：</span>
            <LaBEL>${job.job_area}</LaBEL>
          </li>
          <li><span class="tn-text-note">招聘人数：</span> ${job.job_hiringnum} </li>
          <li><span class="tn-text-note">申请人数：</span> 5 </li>
        </ul>
      </div>
      <!--职位列表-->
    </div>
  </div>
  <div class="bottomban">
    <div class="bottombanbox"> <img src="../images/${company.company_pic}" /> </div>
  </div>
</div>
</div>
</div>
<!-- InstanceBeginEditable name="backtop" -->
<p class="it-back-to-top" style=" position:fixed" id="backTop" title="返回顶部"> <a href="#top"> <span> </span> 返回顶部 </a> </p>
<!-- InstanceEndEditable -->
<iframe src="<%=basePath%>/foot.jsp" width="100%" height="150" scrolling="no" frameborder="0" ></iframe>
</div>
<script type="text/javascript">
  var applytime;


  //补0
  function repair(i){
    if (i >= 0 && i <= 9) {
      return "0" + i;
    } else {
      return i;
    }
  }
  //日期函数

  function getCurrentTime() {
    var date = new Date();//当前时间
    var year = date.getFullYear() //返回指定日期的年份
    var month = repair(date.getMonth() + 1);//月
    var day = repair(date.getDate());//日
    var hour = repair(date.getHours());//时
    var minute = repair(date.getMinutes());//分
    var second = repair(date.getSeconds());//秒

    //当前时间
    var curTime = year + "-" + month + "-" + day
            + " " + hour + ":" + minute + ":" + second;
    return curTime;
  }

  var applybutton = document.getElementById('apply');

  var job_id;
  //console.log(applybutton)
  applybutton.onclick=function (){
    // applybutton.href = "https://www.baidu.com"
    job_id = ${job.job_id};
    applytime = getCurrentTime();
    applybutton.href = "itoffer/company/addJobApply?job_id="+job_id+"&applytime="+applytime
  }
</script>
</body>
</html>